package me.banxi.mia.account.email;

import java.util.Properties;

import org.springframework.mail.MailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;

public class JavaMailSimpleMailSender extends SimpleMailSender {

	@Override
	protected MailSender getMailSender() {
		
		JavaMailSenderImpl sender = new JavaMailSenderImpl();
		sender.setProtocol("smtps");
		sender.setPort(465);
		sender.setHost("smtp.gmail.com");
		sender.setUsername("banxi1988@gmail.com");
		sender.setPassword("0800350211");
	//	sender.getJavaMailProperties().put("mail.smtp.auth", "true");
		Properties props = new Properties();
		props.put("mail.smtp.auth", "true");
		
		sender.setJavaMailProperties(props);
		return sender;
	}

}
